home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 15635 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.0 KB

  1. Path: mail2news.demon.co.uk!lorelei.demon.co.uk
  2. From: John Croudy <john@lorelei.demon.co.uk>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: leave a file open without fclose it.
  5. Date: Sun, 7 Apr 96 17:40:28 GMT
  6. Organization: home
  7. Message-ID: <9604071740.AA001nm@lorelei.demon.co.uk>
  8. References: <4k7ejd$ld8@news.cc.utah.edu>
  9. X-NNTP-Posting-Host: lorelei.demon.co.uk
  10. X-Newsreader: TIN [AMIGA 1.3 950726BETA PL0]
  11. X-Mail2News-Path: relay-4.mail.demon.net!post.demon.co.uk!lorelei.demon.co.uk
  12.  
  13. On 7 Apr 1996 03:59:41 GMT, Steven Huang wrote:
  14.  
  15. > What will happen if i leave a file open without fclose it?
  16.  
  17. The file will stay opened of course!  But seriously, if it's open for
  18. reading it doesn't seem to do much harm...  if opened for writing then
  19. the final buffer-full probably doesn't get written until you close it.
  20. And it depends what system you're runing on.  Some operating systems
  21. like VAX/VMS close files on program exit, some like MS-DOS don't seem
  22. to.
  23.  
  24. The best thing to do is close it.  And then you don't have to worry
  25. about it.
  26.  
  27. John
  28. xxxx
  29.